# PrintXOfSymbol.py # # Description: Prints x times a symbol in a row. # Applying the Generalization Principle. # # Anne Lavergne # Date: Feb. 11 2024 def printXOfSymbol(symbolToPrint, numberOfSymbol): """Prints "symbolToPrint" "numberOfSymbol" times in a row.""" # Print "symbolToPrint" "numberOfSymbol" times print(symbolToPrint * numberOfSymbol) # Nothing to return! return #*** Main part of my program # Ask the user for a symbol to print symbol = input("Please, enter the symbol you wish to have printed: ") # Ask the user for the number of times this symbol is to be printed numberOfSymbol = int(input(f"Please, enter the number of times \ you wish {symbol} to be printed: ")) # Call printXOfSymbol with this symbol and this number printXOfSymbol(symbol, numberOfSymbol)